package net.b521.petshop.web;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by Allen on 2019/03/23 13:32.
 */
@Controller
@RequestMapping(value = "/hello")
public class TestController {

    @RequestMapping(value = "index")
    public String hello(Model model) {
        model.addAttribute("name", "dear");
        return "hello/index";

    }

    @RequestMapping(value = "i")
    public String i(Model model) {
        model.addAttribute("name", "index");
        return "/i";
    }

}
